*** Settings ***
Documentation    删除话题
Library     SeleniumLibrary

*** test cases ***
用户登录成功
    Open Browser    http://39.107.96.138:3000/    Chrome
    Maximize Browser Window
    Set Selenium Implicit Wait    5
    Set Selenium Speed    0.5
    Click Element   //a[@href="/signin"]
    Input Text    //*[@id="name"]     mitty
    Input Text    //*[@id="pass"]    123456
    Click Element    //input[@type="submit"]
    Element Text Should Be    //span[@class="user_name"]/a[@class="dark"]    mitty

找到话题
    Go To    http://39.107.96.138:3000/topic/5df0b481a5e7c61b0a6ecc55

删除话题
    Click Element    //i[@title="删除"]
    Handle Alert    action=DISMISS
    Click Element    //i[@title="删除"]
    Handle Alert
    Go To    http://39.107.96.138:3000/topic/5df0b481a5e7c61b0a6ecc55
    Element Text Should Be  //strong    此话题不存在或已被删除。